import React from 'react';
import Barcode from 'react-barcode';
import styles from './CouponBarcode.less';

class CouponBarcode extends React.Component {
  render() {
    return (<div className={styles.couponBarcode}>
      <div className={styles.title}>券码：<span className={styles.code}>{this.props.code}</span></div>
      <Barcode displayValue={false} value={this.props.code} height={60} background={"rgba(255, 255, 255, 0)"} />
      <div className={styles.info}>请收银员扫描以上条形码验券</div>
    </div>);
  }
}

CouponBarcode.propTypes = {
  code: React.PropTypes.string,
};

export default CouponBarcode;
